//当前子reducer函数只管理count这个数字
export default function reducer (state:any = {},action:any){
    const {type,data}=action
    //判断
    // var newaddress=JSON.parse(JSON.stringify(state))
    if(type==='CHANGEADDRESS'){
        state=data
    }
    if(type==='DELADDRESS'){
        state={}
    }
    //返回一个全新的state
    return state;
}